<!DOCTYPE html>
<html lang="en">
{% load static %}
{% include 'api/header.html' %}
<body>
{% include 'api/nav-top.html' %}
<div class="container-fluid">
    <div class="row">
              {% include 'api/nav-left.html' %}
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
             <ol class="breadcrumb">
                  <li><a href="{% url 'api:module'  %}">模块</a></li>
                  <li><a href="{% url 'api:case' mid %}">用例</a></li>
                  <li><a href="{% url 'api:fuzz' mid case.id %} ">模糊用例</a></li>
                  <!--<li class="active">Data</li>-->
             </ol>
            <h1 class="page-header">{{case.name}}--模糊用例管理</h1>
             <button type="button" class="btn btn-primary" id="btn-new">新建</button>
             <button type="button" class="btn btn-primary" id="btn-fuzz-batch" >模糊生成</button>
            <input type="hidden" id="cid" value="{{case.id}}" />
            <input type="hidden" id="curl" value="{{case.url}}" />
            <input type="hidden" id="cname" value="{{case.name}}" />
            <input type="hidden" id="cpro" value="{{case.protocol}}" />
            <input type="hidden" id="cmethod" value="{{case.method}}" />
            <input type="hidden" id="cparams" value="{{case.params}}" />
            <input type="hidden" id="chope" value="{{case.hope}}" />
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                    <tr>
                         <th>用例名称</th>
                        <th>协议</th>
                        <th>url</th>
                        <th>方法</th>
                        <th>入参</th>
                        <th>期望值</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {% if fuzz_list %}
                    {% for i in  fuzz_list %}
                    <tr id="{{i.id}}">
                        <td>{{i.name}}</td>
                        <td>{{i.protocol}}</td>
                        <td class="break-word-w300">{{i.url}}</td>
                        <td>{{i.method}}</td>
                        <td class="break-word-w300">{{i.params}}</td>
                        <td>{{i.hope}}</td>
                        <td>
                            <input type="button" class="btn btn-lg btn-primary btn-edit" value="编辑"  data-toggle="modal" data-target="#modal-case">
                            <input type="button"  class="btn btn-lg btn-primary btn-del" value="删除">
                        </td>
                    </tr>
                    {% endfor %}
                    {% else %}
                    <tr>
                        <td>无数据</td>
                    </tr>
                    {% endif %}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

{% include 'api/del.html' %}
{% include 'api/edit-fuzz.html' %}
{% include 'api/alert.html' %}
{% include 'api/foot.html' %}
<script src=" {% static 'js/common.js'%}"></script>
<script src=" {% static 'js/fuzz.js'%}"></script>


</body>
</html>
